When the binding extender is set to online (i.e. when its Online property is set to 'true'), following steps are performed internally:
- Each configured binding makes its “links”, i.e. hooks the handlers for its configured event sources. For example, the PointBinding-s have ReadEventSource and WriteEventSource, so if they are configured, the binding will link the events with handlers that perform Read or Write operation on the point binding.
- All binding groups perform their configured automatic operations. For PointBindingGroup-s, this means that:
- If AutoRead property is set, the Read operation is executed for all PointBinding-s that have Read included in their BindingOperations property (this includes “Get” of OPC-DA properties).
- If AutoSubscribe property is set, the Subscribe(true) operation is executed for all PointBinding-s that have Subscribe included in their BindingOperations property.
- All binding groups make their “links”, i.e. hook the handlers for their configured event sources. For PointBindingGroup-s, this means that the events for ReadEventSource and WriteEventSource will be linked with handlers that perform Read or Write operation on the binding group.
- The OnlineChanged event is raised on the BindingExtender.
When setting the binding extender to offline, the above steps are (roughly said) reversed. There are, however, differences in Step 2: For PointBindingGroups-s, the Read operations are not executed; instead, if AutoWrite property is set, the Write operation is executed for all PointBinding-s that have Write included in their BindingOperations property. Also, if AutoSubscribe property is set, the Subscribe(false) operation is executed (i.e. unsubscribe, instead of subscribe).
See Also